// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import Character from "../../BASE/Character";
import GeZiManager from "../../Manager/GeZiManager";
import MessageCenter from "../../Message/MessageCenter";
import { SHMessage } from "../../Message/SHMessage";

import DXX from "./DXX";

const {ccclass, property} = cc._decorator;

@ccclass
export default class D01 extends DXX {

    target:Character=null;
    TheNumber:string = 'D01';
    Cname:string="十字架";
in:Boolean=false

    start () {
        this.target=this.node.getComponent(Character);
      
        this.target.move2.push(this)
      
    }
  
  Move2(arg0: number, Pturn: number, time: number): void {
    GeZiManager.getMB();
  
  
  
    switch (this.target.color) {
        case "Blue":GeZiManager.shanchu(GeZiManager.redM,this.target.ZB);GeZiManager.redM.push(arg0)
            
            break;
      
        default:GeZiManager.shanchu(GeZiManager.blueM,this.target.ZB);GeZiManager.blueM.push(arg0);
            break;
      }


  }
P(){
    if (!this.in) {


        GeZiManager.getMB();   

    GeZiManager.shanchu(this.target.move2,this)
    }
    

}
remove(){
   
    GeZiManager.shanchu(this.target.move2,this)
}

}